USE [texchange_db]
GO

/****** Object:  StoredProcedure [dbo].[SP_InsCompany]    Script Date: 05/29/2011 19:47:22 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE proc [dbo].[SP_InsCompany] 
  @name nvarchar(100),
  @country_id bigint,
  @city nvarchar(150),
  @postcode nvarchar(50),
  @address nvarchar(100),
  @type_company_id bigint,
  @operating_licence nvarchar(50),
  @operating_activity nvarchar(200),
  @telephone nvarchar(50),
  @ext nvarchar(4),
  @fax nvarchar(50),
  @mobile nvarchar(50),
  @website nvarchar(50),
  @contact_person nvarchar(50),
  @language nvarchar(50),
  @job_title nvarchar(50),
  @company_status int,
  @email nvarchar(50),
  @mobile_phone nvarchar(20),
  @tax_file_number nvarchar(20)
as
	BEGIN
		SET NOCOUNT ON

		INSERT INTO Company (name, country_id, City, postcode, [address], type_company_id,
			operating_activity, telephone, fax, mobile, website, contact_person, [language], job_title, company_status, email, mobile_phone, tax_file_number, operating_licence, ext) 
		VALUES(@name, @country_id, @city, @postcode, @address, @type_company_id,
			@operating_activity, @telephone, @fax, @mobile, @website, @contact_person, @language, @job_title, @company_status, @email, @mobile_phone, @tax_file_number, @operating_licence, @ext)
		SELECT NEWID = @@Identity
	END




GO


